﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>客户管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../Layui/css/layui.css" media="all">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
    <div style=" margin-top:20px;"></div>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <form class="layui-form" action="" style="padding-top:5px;">

                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">渠道来源</label>
                                <div class="layui-input-inline">
                                    <select name="modules" lay-verify="required" lay-search="">
                                        <option value="">直接选择或搜索选择</option>
                                        <option value="1">地推</option>
                                        <option value="2">活动</option>
                                        <option value="3">电话</option>
                                        <option value="4">上门</option>
                                    </select>
                                </div>

                                <label class="layui-form-label">登记日期</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="date" id="date" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
                                </div>
                                <label class="layui-form-label">日期结束</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="Jsdate" id="Jsdate" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
                                </div>
                                <div class="layui-input-inline">
                                    <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入内容进行模糊查询" class="layui-input">
                                </div>
                                <button class="layui-btn"><i class="layui-icon">&#xe615;</i></button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div>
                <div class="layui-card" style=" padding-left:10px;">
                    <div class="layui-btn-container">
                        <div class="layui-btn-container layadmin-layer-demo" style="padding-top:10px;">
                            <button data-method="offset" data-type="auto" class="layui-btn layui-btn-normal " data-content="create.html">　　创建　　</button>
                            <button data-method="offset" data-type="auto" class="layui-btn layui-btn-normal" data-content="import.html">　　导入　　</button>
                            <button data-method="offset" data-type="auto" class="layui-btn layui-btn-normal" data-content="distribution.html">　　分配　　</button>
                            <button data-method="offset" data-type="auto" class="layui-btn layui-btn-normal" data-content="receive.html">　　领取　　</button>
                            <button data-method="offset" data-type="auto" class="layui-btn layui-btn-normal" data-content="follow-up.html">　　跟进　　</button>
                            <button data-method="offset" data-type="auto" class="layui-btn layui-btn-normal" data-content="sgin.html">　　签约　　</button>

                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                        <ul class="layui-tab-title">
                            <li class="layui-this">待分配<span class="layui-badge">99+</span></li>
                            <li>待领取<span class="layui-badge">12</span></li>
                            <li>待跟进</li>
                            <li>待签约</li>
                            <li>今日到访<span class="layui-badge">13</span></li>
                            <li>新会员<span class="layui-badge">15</span></li>
                            <li>老会员</li>
                            <li>待续会员<span class="layui-badge">99+</span></li>
                            <li>历史客户</li>
                            <li>合同未审核通过<span class="layui-badge">2</span></li>
                        </ul>
                        <div class="layui-card-body">
                            <table class="layui-table" lay-skin="line" lay-data="{ url:'/Sys/Grant/Data?', page:true, id:'idTest',height: 'full-250', cellMinWidth: 120,}" lay-filter="demo">
                                <thead>
                                    <tr>

                                        <th lay-data="{field:'id',  sort: true, fixed: true}">宝宝姓名</th>
                                        <th lay-data="{field:'username'}">宝宝小名</th>
                                        <th lay-data="{field:'sex', sort: true}">月龄</th>
                                        <th lay-data="{field:'city'}">家长姓名</th>
                                        <th lay-data="{field:'sign'}">联系电话</th>
                                        <th lay-data="{field:'experience', sort: true}">状态</th>
                                        <th lay-data="{field:'classify'}">最近跟进时间</th>
                                        <th lay-data="{field:'wealth', sort: true}">渠道来源</th>
                                        <th lay-data="{field:'score' }">备注</th>
                                        <th lay-data="{ width:178, align:'center', toolbar: '#barDemo'}">操作</th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                    </div>
                </div>
            </div>


        </div>



    </div>
    <script src="../Layui/layui.js"></script>

    <script>
        layui.config({
            base: '../Layui/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use('index');
    </script>
    <script>
        layui.use('laydate', function () {
            var laydate = layui.laydate;

            //执行一个laydate实例
            laydate.render({
                elem: '#date' //指定元素
            });

            laydate.render({
                elem: '#Jsdate' //指定元素
            });
        });
    </script>
    <!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
    <script>
        layui.use('layer', function () { //独立版的layer无需执行这一句
            var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句

            //触发事件
            var active = {
                offset: function (othis) {
                    var type = othis.data('type')
                        , text = othis.text(), url = othis.data('content');

                    var index = layer.open({
                        type: 2
                        , offset: type //具体配置参考：http://www.layui.com/doc/modules/layer.html#offset
                        , id: 'Cutomer' + type //防止重复弹出
                        , content: url
                        , title: text

                    });
                    layer.full(index);
                }
            };

            $('.layui-btn').on('click', function () {
                var othis = $(this), method = othis.data('method');
                active[method] ? active[method].call(this, othis) : '';
            });

        });
    </script>

    <script>
        layui.use('table', function () {
            var table = layui.table;
            //监听工具条
            table.on('tool(demo)', function (obj) {
                var data = obj.data;
                if (obj.event === 'detail') {
                    layer.msg('ID：' + data.id + ' 的查看操作');
                } else if (obj.event === 'del') {
                    layer.confirm('真的删除行么', function (index) {
                        obj.del();
                        layer.close(index);
                    });
                } else if (obj.event === 'edit') {
                    layer.alert('编辑行：<br>' + JSON.stringify(data))
                }
            });

        });
    </script>
    <script type="text/html" id="barDemo">
        <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
        <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    </script>

</body>
</html>